package com.coders.vimek.threading;

 class TwoThreadsTest  extends Thread {


	 public TwoThreadsTest(String str) {
	        super(str);
	    }
	    public void run() {
	        for (int i = 0; i < 10; i++) {
	            System.out.println(i + " " + getName());
	            try {
	                sleep((int)(Math.random() * 1000));
	            } catch (InterruptedException e) {}
	        }
	        System.out.println("DONE! " + getName());
	    }
	  
	}
 public class JavaThreadsExtendingThreadExample {
    public static void main (String[] args) {
        new TwoThreadsTest("sasi").start();
        new TwoThreadsTest("kovi").start();
    }
}